package com.fy.distributor.controller;


import com.fy.common.api.CommonResult;
import com.fy.common.api.OperationCode;
import com.fy.distributor.vo.LoginVo;
import com.fy.distributor.vo.ResetVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/distributor/login")
@Api(tags = "分销商登录")
@RefreshScope
public class Login {

    @ApiOperation("登录")
    @PostMapping(value = "login")
    public CommonResult login(@RequestBody LoginVo loginVo) {
        return CommonResult.result(OperationCode.SUCCEED_10200.getCode(), OperationCode.SUCCEED_10200.getMessage());
    }

    @ApiOperation("忘记密码")
    @PostMapping(value = "/updatePasswordByPhoneCode")
    public CommonResult updatePasswordByPhone(@RequestBody ResetVo resetVo)
    {
        return CommonResult.result(OperationCode.ERROR_40300.getCode(), OperationCode.ERROR_40300.getMessage());
    }

    @ApiOperation("注册")
    @GetMapping(value = "/register")
    public CommonResult register(@RequestBody ResetVo resetVo)
    {
        return CommonResult.result(OperationCode.ERROR_40300.getCode(), OperationCode.ERROR_40300.getMessage());
    }

    @ApiOperation("发送短信")
    @PostMapping(value = "/sendnote")
    public CommonResult sendNote(Integer phone) {
        return CommonResult.success();
    }
}
